package org.linlinjava.litemall.db.vo.shop;

import org.linlinjava.litemall.db.domain.AgedmallGoodsEqu;
import org.linlinjava.litemall.db.domain.AgedmallHospitalSendSelfLocationEqu;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * @author wj
 * @date 2022/1/18 15:17
 */
public class HospitalSelfLocationEquVo {

    private Integer id;

    private Integer storeId;

    private Integer goodsId;

    private Integer skuId;

    private String skuName;

    private String equIdArray;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSkuName() {
        return skuName;
    }

    public void setSkuName(String skuName) {
        this.skuName = skuName;
    }

    public String getEquIdArray() {
        return equIdArray;
    }

    public void setEquIdArray(String equIdArray) {
        this.equIdArray = equIdArray;
    }

    public Integer getStoreId() {
        return storeId;
    }

    public void setStoreId(Integer storeId) {
        this.storeId = storeId;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Integer getSkuId() {
        return skuId;
    }

    public void setSkuId(Integer skuId) {
        this.skuId = skuId;
    }

    public static AgedmallHospitalSendSelfLocationEqu toequRelation(Long selfLocationId,Long rfid){
        AgedmallHospitalSendSelfLocationEqu locationEqu=new AgedmallHospitalSendSelfLocationEqu();
        locationEqu.setHospitalSelfLocationId(selfLocationId);
        locationEqu.setAddTime(LocalDateTime.now());
        locationEqu.setEquId(rfid);
        return locationEqu;
    }

    public static AgedmallGoodsEqu toGoodsEqu(HospitalSelfLocationEquVo locationEquVo,Long rfid){
        AgedmallGoodsEqu goodsEqu=new AgedmallGoodsEqu();
        goodsEqu.setGoodsId(locationEquVo.getGoodsId().longValue());
        goodsEqu.setStoreId(locationEquVo.getStoreId().longValue());
        goodsEqu.setGoodsProductId(locationEquVo.getSkuId().longValue());
        goodsEqu.setEquId(rfid);
        goodsEqu.setType(2);
        goodsEqu.setCommditySkuName(locationEquVo.getSkuName());
        goodsEqu.setState(0);
        goodsEqu.setOnlineTime(LocalDateTime.now());

        return goodsEqu;
    }


}
